import request from '@/utils/request'

// 查询套餐列表
export function getFormaMeal(query) {
    return request({
        url: '/system/meal/list',
        method: 'get',
        params: query
    })
}
// 查询套餐列表
export function getMealInfoArr(query) {
    return request({
        url: '/system/meal/list_dose',
        method: 'get',
        params: query
    })
}

// 查询套餐详细
export function getMeal(mealId) {
    return request({
        url: '/system/meal/' + mealId,
        method: 'get'
    })
}
// http://localhost:8081/meal/spec
// 新增套餐
export function addMeal(data) {
    return request({
        url: '/system/meal',
        method: 'post',
        data: data
    })
}

// 修改套餐
export function updateMeal(data) {
    return request({
        url: '/system/meal',
        method: 'put',
        data: data
    })
}

// 删除套餐
export function delMeal(mealId) {
    return request({
        url: '/system/meal/' + mealId,
        method: 'delete'
    })
}